import * as type from './type'

const actionCreators = {
    getselectRightbox(){
        // 在这里写一个异步请求
        return dispatch =>{
            fetch('/data/select.json')
            .then(res=>res.json())
            .then(result=>{
                console.log(result)
                let action = {
                    type:type.GET_SELECT_RIGHTBOX,
                    payload:result
                }
                dispatch(action)

            })
            .catch(err=>console.log(err))
        }
    }

}

export default actionCreators